#pragma once
#include <vector>
#include "collision.h"

class Snake {
public:
    Snake(int screenWidth, int screenHeight, int gridSize);
    void move();
    void changeDirection(int newDirection);
    bool checkCollision(const CollisionBox& other) const;
    void grow();
    const std::vector<RectangleCollisionBox>& getBody() const;
    const RectangleCollisionBox& getHead() const;
    int getDirection() const;

private:
    std::vector<RectangleCollisionBox> body;
    int direction;
    int screenWidth;
    int screenHeight;
    int gridSize;
};